package com.hgw.gulimall.ware.feign;

import com.hgw.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Data time:2022/3/23 18:38
 * StudentID:2019112118
 * Author:hgw
 * Description:
 */
@FeignClient("gulimall-product")
public interface ProductFeignService {

    /**
     * 1、让所有请求过网关：
     *      @FeignClient("gulimall-gateway")
     *      /api//product/spuinfo/info/{id}
     * 2、直接让后台指定服务处理
     *      @FeignClient("gulimall-product")
     *      /product/spuinfo/info/{id}
     * @param id
     * @return
     */
    @RequestMapping("/product/spuinfo/info/{id}")
    public R info(@PathVariable("id") Long id);
}
